package com.unity3d.player;

import android.content.pm.*;
import android.app.*;

public final class f implements c
{
    private static boolean a(final PackageItemInfo packageItemInfo) {
        try {
            return packageItemInfo.metaData.getBoolean("unityplayer.SkipPermissionsDialog");
        }
        catch (Exception ex) {
            return false;
        }
    }

    @Override
    public final void a(final Activity p0, final Runnable p1) {
        //
        // This method could not be decompiled.
        //
        // Original Bytecode:
        //
        //     1: ifnonnull       5
        //     4: return
        //     5: aload_1
        //     6: invokevirtual   android/app/Activity.getPackageManager:()Landroid/content/pm/PackageManager;
        //     9: astore          5
        //    11: aload           5
        //    13: aload_1
        //    14: invokevirtual   android/app/Activity.getComponentName:()Landroid/content/ComponentName;
        //    17: sipush          128
        //    20: invokevirtual   android/content/pm/PackageManager.getActivityInfo:(Landroid/content/ComponentName;I)Landroid/content/pm/ActivityInfo;
        //    23: astore          6
        //    25: aload           5
        //    27: aload_1
        //    28: invokevirtual   android/app/Activity.getPackageName:()Ljava/lang/String;
        //    31: sipush          128
        //    34: invokevirtual   android/content/pm/PackageManager.getApplicationInfo:(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
        //    37: astore          7
        //    39: aload           6
        //    41: invokestatic    com/unity3d/player/f.a:(Landroid/content/pm/PackageItemInfo;)Z
        //    44: ifne            55
        //    47: aload           7
        //    49: invokestatic    com/unity3d/player/f.a:(Landroid/content/pm/PackageItemInfo;)Z
        //    52: ifeq            62
        //    55: aload_2
        //    56: invokeinterface java/lang/Runnable.run:()V
        //    61: return
        //    62: aload           5
        //    64: aload_1
        //    65: invokevirtual   android/app/Activity.getPackageName:()Ljava/lang/String;
        //    68: sipush          4096
        //    71: invokevirtual   android/content/pm/PackageManager.getPackageInfo:(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
        //    74: astore          7
        //    76: aload           7
        //    78: getfield        android/content/pm/PackageInfo.requestedPermissions:[Ljava/lang/String;
        //    81: ifnonnull       93
        //    84: aload           7
        //    86: iconst_0
        //    87: anewarray       Ljava/lang/String;
        //    90: putfield        android/content/pm/PackageInfo.requestedPermissions:[Ljava/lang/String;
        //    93: new             Ljava/util/LinkedList;
        //    96: dup
        //    97: invokespecial   java/util/LinkedList.<init>:()V
        //   100: astore          6
        //   102: aload           7
        //   104: getfield        android/content/pm/PackageInfo.requestedPermissions:[Ljava/lang/String;
        //   107: astore          7
        //   109: aload           7
        //   111: arraylength
        //   112: istore          4
        //   114: iconst_0
        //   115: istore_3
        //   116: iload_3
        //   117: iload           4
        //   119: if_icmpge       248
        //   122: aload           7
        //   124: iload_3
        //   125: aaload
        //   126: astore          8
        //   128: aload           5
        //   130: aload           8
        //   132: sipush          128
        //   135: invokevirtual   android/content/pm/PackageManager.getPermissionInfo:(Ljava/lang/String;I)Landroid/content/pm/PermissionInfo;
        //   138: getfield        android/content/pm/PermissionInfo.protectionLevel:I
        //   141: iconst_1
        //   142: if_icmpeq       148
        //   145: goto            341
        //   148: aload_1
        //   149: aload           8
        //   151: invokevirtual   android/app/Activity.checkCallingOrSelfPermission:(Ljava/lang/String;)I
        //   154: ifne            160
        //   157: goto            341
        //   160: aload           6
        //   162: aload           8
        //   164: invokeinterface java/util/List.add:(Ljava/lang/Object;)Z
        //   169: pop
        //   170: goto            341
        //   173: new             Ljava/lang/StringBuilder;
        //   176: dup
        //   177: ldc             "Failed to get permission info for "
        //   179: invokespecial   java/lang/StringBuilder.<init>:(Ljava/lang/String;)V
        //   182: astore          9
        //   184: aload           9
        //   186: aload           8
        //   188: invokevirtual   java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   191: pop
        //   192: aload           9
        //   194: ldc             ", manifest likely missing custom permission declaration"
        //   196: invokevirtual   java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   199: pop
        //   200: iconst_5
        //   201: aload           9
        //   203: invokevirtual   java/lang/StringBuilder.toString:()Ljava/lang/String;
        //   206: invokestatic    com/unity3d/player/e.Log:(ILjava/lang/String;)V
        //   209: new             Ljava/lang/StringBuilder;
        //   212: dup
        //   213: ldc             "Permission "
        //   215: invokespecial   java/lang/StringBuilder.<init>:(Ljava/lang/String;)V
        //   218: astore          9
        //   220: aload           9
        //   222: aload           8
        //   224: invokevirtual   java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   227: pop
        //   228: aload           9
        //   230: ldc             " ignored"
        //   232: invokevirtual   java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   235: pop
        //   236: iconst_5
        //   237: aload           9
        //   239: invokevirtual   java/lang/StringBuilder.toString:()Ljava/lang/String;
        //   242: invokestatic    com/unity3d/player/e.Log:(ILjava/lang/String;)V
        //   245: goto            341
        //   248: aload           6
        //   250: invokeinterface java/util/List.isEmpty:()Z
        //   255: ifeq            265
        //   258: aload_2
        //   259: invokeinterface java/lang/Runnable.run:()V
        //   264: return
        //   265: aload_1
        //   266: invokevirtual   android/app/Activity.getFragmentManager:()Landroid/app/FragmentManager;
        //   269: astore_1
        //   270: new             Lcom/unity3d/player/f$1;
        //   273: dup
        //   274: aload_0
        //   275: aload           6
        //   277: aload_1
        //   278: aload_2
        //   279: invokespecial   com/unity3d/player/f$1.<init>:(Lcom/unity3d/player/f;Ljava/util/List;Landroid/app/FragmentManager;Ljava/lang/Runnable;)V
        //   282: astore_2
        //   283: aload_1
        //   284: invokevirtual   android/app/FragmentManager.beginTransaction:()Landroid/app/FragmentTransaction;
        //   287: astore_1
        //   288: aload_1
        //   289: iconst_0
        //   290: aload_2
        //   291: invokevirtual   android/app/FragmentTransaction.add:(ILandroid/app/Fragment;)Landroid/app/FragmentTransaction;
        //   294: pop
        //   295: aload_1
        //   296: invokevirtual   android/app/FragmentTransaction.commit:()I
        //   299: pop
        //   300: return
        //   301: astore_1
        //   302: new             Ljava/lang/StringBuilder;
        //   305: dup
        //   306: ldc             "Unable to query for permission: "
        //   308: invokespecial   java/lang/StringBuilder.<init>:(Ljava/lang/String;)V
        //   311: astore_2
        //   312: aload_2
        //   313: aload_1
        //   314: invokevirtual   java/lang/Exception.getMessage:()Ljava/lang/String;
        //   317: invokevirtual   java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
        //   320: pop
        //   321: bipush          6
        //   323: aload_2
        //   324: invokevirtual   java/lang/StringBuilder.toString:()Ljava/lang/String;
        //   327: invokestatic    com/unity3d/player/e.Log:(ILjava/lang/String;)V
        //   330: return
        //   331: astore          6
        //   333: goto            62
        //   336: astore          9
        //   338: goto            173
        //   341: iload_3
        //   342: iconst_1
        //   343: iadd
        //   344: istore_3
        //   345: goto            116
        //    Exceptions:
        //  Try           Handler
        //  Start  End    Start  End    Type
        //  -----  -----  -----  -----  ---------------------------------------------------------
        //  11     55     331    336    Ljava/lang/Exception;
        //  55     61     331    336    Ljava/lang/Exception;
        //  62     93     301    331    Ljava/lang/Exception;
        //  93     114    301    331    Ljava/lang/Exception;
        //  128    145    336    248    Landroid/content/pm/PackageManager$NameNotFoundException;
        //  128    145    301    331    Ljava/lang/Exception;
        //  148    157    336    248    Landroid/content/pm/PackageManager$NameNotFoundException;
        //  148    157    301    331    Ljava/lang/Exception;
        //  160    170    336    248    Landroid/content/pm/PackageManager$NameNotFoundException;
        //  160    170    301    331    Ljava/lang/Exception;
        //  173    245    301    331    Ljava/lang/Exception;
        //  248    264    301    331    Ljava/lang/Exception;
        //  265    300    301    331    Ljava/lang/Exception;
        //
        // The error that occurred was:
        //
        // java.lang.NullPointerException
        //     at com.strobel.assembler.ir.StackMappingVisitor.push(StackMappingVisitor.java:290)
        //     at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.execute(StackMappingVisitor.java:833)
        //     at com.strobel.assembler.ir.StackMappingVisitor$InstructionAnalyzer.visit(StackMappingVisitor.java:398)
        //     at com.strobel.decompiler.ast.AstBuilder.performStackAnalysis(AstBuilder.java:2030)
        //     at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:108)
        //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:211)
        //     at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:99)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:782)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:675)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:552)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:519)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:161)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:150)
        //     at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:125)
        //     at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)
        //     at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)
        //     at us.deathmarine.luyten.DecompilerLinkProvider.generateContent(DecompilerLinkProvider.java:97)
        //     at us.deathmarine.luyten.OpenFile.decompileWithNavigationLinks(OpenFile.java:494)
        //     at us.deathmarine.luyten.OpenFile.decompile(OpenFile.java:467)
        //     at us.deathmarine.luyten.Model.extractClassToTextPane(Model.java:413)
        //     at us.deathmarine.luyten.Model.openEntryByTreePath(Model.java:339)
        //     at us.deathmarine.luyten.Model$TreeListener$1.run(Model.java:266)
        //
        throw new IllegalStateException("An error occurred while decompiling this method.");
    }
}
